<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>#{messages.Test}</title>
        <h:outputStylesheet name="jsfcrud.css" library="css"/>
    </h:head>
    <h:body> 
        <div id="subtitle"> #{messages.Practice}|#{messages.Examination}</div>
        <h:form id="myForm" styleClass="jsfcrud_list_form">
            <h:panelGrid columns="2">
                <h:outputLabel>#{messages.Subject}</h:outputLabel>
                <h:selectOneMenu id="subject" value="#{subjectController.selected}" required="true" requiredMessage="#{messages.Select}#{messages.Subject}" >
                    <f:selectItem itemLabel="#{messages.Please}#{messages.Select}"/>
                    <f:selectItems value="#{subjectController.getSubjectList(1)}"/>
                </h:selectOneMenu>
            </h:panelGrid>
            <h:outputLabel class="message" value="#{messages.If}#{messages.No}#{messages.Subject},#{messages.AskTeacher}"/>
            <h:panelGrid columns="1">
                <h:panelGroup class="commandGroupDiv">
                    <h:panelGroup  class="commandDiv">
                        <h:graphicImage name="homework.jpg" library="images" height="200px" width="200px"/><br/>
                        <h:commandLink id="link1" value="#{messages.Start} #{messages.Practice}" action="#{haveTest.startHomework()}" class="mya"/>
                        <h:outputLabel value="#{messages.Practiceinfo}"/>
                    </h:panelGroup>
                    <br/><br/><br/>
                    <h:panelGroup  class="commandDiv">
                        <h:graphicImage name="mytest.jpg" library="images" height="200px" width="200px"/><br/>
                        <h:commandLink id="link2"  value="#{messages.Start} #{messages.Examination}" action="#{haveTest.startExamination()}" class="mya"/>
                        <h:outputLabel value="#{messages.Examinationinfo}"/>
                    </h:panelGroup>                  
                </h:panelGroup>
                <h:outputText escape="false"   value="#{testpaperController.temString}"/>
            </h:panelGrid>
        </h:form>
    </h:body>
</html>
